/*
 * CircleMain.java
 *
 * Created on November 4, 2006, 9:08 AM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package edu.umn.cs5115.scheduler.circle;

import edu.umn.cs5115.scheduler.framework.Document;
import edu.umn.cs5115.scheduler.framework.DocumentController;

import java.net.URL;

/**
 * Kicks off the program.  Generally, there should be a main class with a main
 * method that registers the document type with the shared document controller,
 * then call's it's run method to get everything started.
 * @author grant
 */
public class CircleMain
{
    public static void main(String[] args)
    {
        // Get the application's document controller
        DocumentController documentController = DocumentController.getSharedDocumentController();
        
        // Set the document controller to use our document type
        documentController.setDocumentFactory(new DocumentController.DocumentFactory()
        {
            public Document createDocument()
            {
                return new CircleDocument();
            }
        });
        
        // if the Circle program had a custom menu bar (it doesn't) we would 
        // need to instantiate it's MainMenu subclass and set it as the
        // DocumentController's MainMenu *before* calling run.
        //documentController.setMainMenu(new CustomMainMenuSubclass());
        
        // run the application
        documentController.run();
    }
}
